<template>
  <div class="songerList">
    <el-row :gutter="20" type="flex" style=" flex-wrap: wrap">
      <el-col :span="4" v-for="item in songersImg" :key="item.id">
        <div class="songerCard">
          <img :src="item.picUrl" @click="toSongerDetails(item.id)" />
          <div class="songerName" @click="toSongerDetails(item.id)">{{item.name}}</div>
        </div>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="4" v-for="item in songersText" :key="item.id">
        <div class="songerText" @click="toSongerDetails(item.id)">{{item.name}}</div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: "HotSonger",
  props: ["songersImg", "songersText"],
  methods: {
    toSongerDetails(id) {
      this.$router.push({ name: "SongerDetails", params: { id: id } });
    }
  }
}
</script>

<style scoped>
.songerCard {
  background-color: RGB(251, 251, 253);
  padding: 10px;
  margin-bottom: 20px;
}
.songerCard img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.songerName {
  font-size: 1rem;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  text-align: center;
  margin: 10px 0 0 0;
  cursor: pointer;
}
.songerName:hover {
  color: RGB(64, 158, 255);
}
.songerText {
  font-size: 1rem;
  text-align: center;
  margin: 10px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
}
.songerText:hover {
  color: RGB(64, 158, 255);
}
.el-col {
  border-radius: 4px;
}
.bg-purple-dark {
  background: #99a9bf;
}
.bg-purple {
  background: #d3dce6;
}
.bg-purple-light {
  background: #e5e9f2;
}
.grid-content {
  border-radius: 4px;
  min-height: 36px;
}
.row-bg {
  padding: 10px 0;
  background-color: #f9fafc;
}
</style>